<div style="padding:30px;">

  <?php if(!empty($salary)) { ?>
 <form action="<?= $admin_base_url; ?>staff/salary_edit/<?=$salary['id'];?>/<?php echo $cur_page;?>" method="post" id="staff_form">
 <?php } else { ?>
 <form action="<?= $admin_base_url; ?>staff/salary/<?= $id;?>/<?= $cur_page;?>" method="post" id="staff_form">
 <?php } ?>
 

    

		<label> Name </label>
        <input type="hidden" value="<?php echo $id; ?>" name="staff_id"/>
		<?php echo $staff['first_name'];?> &nbsp; <?php echo $staff['last_name'];?><br/><br/>

    	
         <label><?php echo getLangText('staff_staff_code',$this); ?> </label><?php echo $staff['staff_code'];?> <br/><br/>
	       
		<label> <?php echo getLangText('staff_designation',$this); ?></label>
		 <?php echo $staff['designation'];?><br/><br/>
	
    	<label><?php echo getLangText('staff_basic_pay',$this); ?></label>
		<input class="txt1" type="text" id="basic" name="basic_pay" value="<?php echo $salary['basic_pay'];?>" onkeyup="Sum('')"/> <br/>
        
        <label> <?php echo getLangText('staff_sal_da_type',$this); ?></label>
        <select name="da_type" class="txt1" id="da_type">
        <option value="">Select </option>
        <option value="amount" <?php if($salary['da_type']=='amount') echo "selected"; ?>> Amount </option>
        <option value="percent" <?php if($salary['da_type']=='percent') echo "selected"; ?>> Percent </option>
        
		</select> <br/>
    
		<label> <?php echo getLangText('staff_sal_da',$this); ?></label>
		<input class="txt1" type="text" id="da_amount" name="da_amount" value="<?php echo $salary['da_amount'];?>" onkeyup="Sum('')"/> <br/>
	<br/>
    
    <label> <?php echo getLangText('staff_sal_hra_type',$this); ?></label>
        <select name="hra_type" id="hra_type" class="txt1">
        <option value="">Select </option>
        <option value="amount" <?php if($salary['hra_type']=='amount') echo "selected"; ?>> Amount </option>
        <option value="percent" <?php if($salary['hra_type']=='percent') echo "selected"; ?>> Percent </option>
        
		</select> <br/>
		<label> <?php echo getLangText('staff_sal_hra',$this); ?></label>
		<input class="txt1" type="text" id="hra_amount" name="hra_amount" value="<?php echo $salary['hra_amount'];?>" onkeyup="Sum('')"/> <br/>		
         <br/>
	
    
		<label> <?php echo getLangText('staff_sal_oa',$this); ?></label>
		<input class="txt1" type="text" id="other_allowance" onkeyup="Sum('')" name="other_allowance" value="<?php echo $salary['other_allowance'];?>"/> <br/>
        
		<label> <?php echo getLangText('staff_sal_total',$this); ?></label>
		<input class="txt1" type="text" id="total" name="total" value="<?php echo $salary['total'];?>" onFocus="Sum('')" onkeyup="netAmount('')"/> <br/>
	<br/>
    
	<label> <?php echo getLangText('staff_sal_pf',$this); ?></label>
		<input class="txt1" type="text" id="pf_amount" name="pf_amount" value="<?php echo $salary['pf_amount'];?>" onkeyup="netAmount('')"/> <br/>
	
    <label> <?php echo getLangText('staff_sal_lid',$this); ?></label>
		<input class="txt1" type="text" id="life_insurance" name="life_insurance" value="<?php echo $salary['life_insurance'];?>" onkeyup="netAmount('')"/> <br/>
   
   <label> <?php echo getLangText('staff_sal_mr',$this); ?></label>
		<input class="txt1" type="text" name="misc_recoveries" id="misc_recoveries" value="<?php echo $salary['misc_recoveries'];?>" onkeyup="netAmount('')"/> <br/>
    
		<label><?php echo getLangText('staff_sal_net',$this); ?> </label>
        <input class="txt1" type="text" id="net_amount_paid" name="net_amount_paid" onFocus="netAmount('')" value="<?php echo $salary['net_amount_paid'];?>"/> <br/>
        
         
        
        <label><?php echo getLangText('staff_sal_remark',$this); ?> </label>
	  <textarea class="txt1" name="remarks" cols="15" rows="2"><?php echo $salary['remarks'];?></textarea><br/>
	
		<label>&nbsp;</label>
		   
			<div class="buttons">
			    <button type="submit" name="save" class="positive" value="save" >
                
			        <img src="<?php echo $admin_image_path?>icons/apply.png" alt=""/>
			          <?php if(!empty($salary)) { 
 						echo getLangText('staff_update_salary',$this); 
						?>
 							<input type="hidden" name="id" value="<?php echo $id;?>" />
                       
 							<input  type="hidden" name="rurl" value="<?php echo $rurl;?>" />
 					  <?php } else { 
 					  	 echo getLangText('staff_add_salary',$this); 
 					  	 } ?>

 			    </button>
			   <a href="<?= $admin_base_url; ?>staff/cancel?rurl=<?php echo $rurl;?>" class="negative">
			        <img src="<?php echo $admin_image_path?>icons/cross.png" alt=""/>
			        <?php echo getLangText('staff_cancel_button',$this); ?>
			   </a>
			</div>
		


 </form>
 </div>
 <script type="text/javascript">//<![CDATA[
      Calendar.setup({
        inputField : "f_dob",
        trigger    : "f_dob_button",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d"
      });
    //]]></script>
 <script>
 $(document).ready(function() {
     $("#staff_form").RSV({
       onCompleteHandler: frmSubmit,
       errorFieldClass: "errorDesc",
       displayType: "display-html",
       errorHTMLItemBullet: "&#8212; ",
             rules: [
                     "required,basic_pay,Please enter name.",
					 
             ]
     });
  // a custom onComplete handler to prevent form submits for the demo
     function frmSubmit()
     {
       return true;
     }

        
});
 </script>
 